package com.zqx.factory.client;

import com.zqx.factory.config.Config;
import com.zqx.factory.factory.ChartFactory;
import com.zqx.factory.product.Chart;
import com.zqx.factory.utils.XMLUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 客户端测试类
 * @author
 * @date 2018/09/01
 */
@Slf4j
public class Client {

    @Autowired
    private Config config;
    public static void main(String[] args) {

        /*Chart chart = ChartFactory.getChart("histogram");
        chart.display();*/
        //读取配置文件中参数
        String type = XMLUtil.getChartType();
        log.info("读取的值"+type);
        Chart chart = ChartFactory.getChart(type);
        chart.display();
    }
}
